<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .outer {
      width: 200px;
      height: 200px;
      border: 1px solid black;
      margin: 100px auto 0;
      /* 父元素开启3d空间 */
      transform-style: preserve-3d;
      /* 设置景深(用户眼睛与元素之间的距离) */
      perspective: 500px;
      /* 修改用户观看的方位 (视角右移300px, 视角下移240px) */
      perspective-origin: 300px 240px;
      position: relative;
    }
    .inner {
      width: 200px;
      height: 200px;
      background-color: rgba(0, 191, 255, .726);
      /* 往z轴方向向用户方向位移100px */
      /* transform: translateZ(100px); */
      transform: translate3d(0, 0, 100px);
      /* translate: 0 0 100px; */
      position: absolute;
    }
    .left {
      width: 200px;
      height: 200px;
      background-color: pink;
      position: absolute;
      /* y轴方向左旋转90度 */
      rotate: y 90deg;
      /* 沿着x轴方向向左位移100px */
      translate: -100px 0;
    }
    .right {
      height: 200px;
      width: 200px;
      background-color: aquamarine;
      position: absolute;
      /* y轴方向左旋转90度 */
      rotate: y 90deg;
      /* 沿着x轴方向右位移100px */
      translate: 100px 0;
    }
  </style>
</head>
<body>
  <div class="outer">
    <div class="left">left</div>
    <div class="inner">hello world</div>
    <div class="right">right</div>
  </div>
</body>
</html>
